package il.technion.math.zipfdistribution;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class DistributionFileMaker {

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{	
		try {
			BufferedWriter out = new BufferedWriter(new FileWriter("keys_06.txt"));
			EfficentZipfDistribution ezd = new EfficentZipfDistribution(0.7, 100000, 0);
			String line = "";
			int rnd;
		for(int i=0; i<2000;i++)
		{
			for(int j =0; j<2000;j++)
			{
				
				 rnd = ezd.Sample();
				
				line += (","+rnd);
				
			}
			out.write(line);
			line = "";
			out.newLine();
			System.out.println(i);
		}
		out.close();
		}
		catch (IOException e)
		{
			System.out.println("Exception ");		
		}
		
		return ;
	} // main ends here.

}
